package com.liusu.spider.test;

import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
import org.junit.jupiter.api.Test;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class Message {

    @Test
    public void context(){
        try {
            MessageDigest md5 = MessageDigest.getInstance("MD5");
            String msg = "m3u8";
            byte[] bytes = md5.digest(msg.getBytes());
            System.out.println(Base64.encode(bytes));
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }
    }
    @Test
    public void context1(){
        /**
         * 路径分隔符
         * ;
         */
        String separator = File.pathSeparator;
        System.out.println(separator);

    }
    @Test
    public void context2(){
        /**
         * \
         */
        String separator = File.separator;
        System.out.println(separator);

    }
}
